package cn.ai.shoes.core.config;

import cn.ai.shoes.core.filter.JWTAuthenticationFilter;
import cn.ai.shoes.core.utils.JwtUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class CommenSecurityComfig {

    /**
     * jwt工具类
     * @return
     */
    @Bean
    public JwtUtils jwtUtils(){
        return new JwtUtils();
    }
    /**
     * jwt过滤器
     * @return
     */
   @Bean
    public JWTAuthenticationFilter jwtAuthenticationFilter(){
       return new JWTAuthenticationFilter();
    }
    /**
     * 白名单配置
     * @return
     */
    @Bean
    public IgnoreUrlsConfig ignoreUrlsConfig(){
        return new IgnoreUrlsConfig();
    }
}
